import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule, Routes} from '@angular/router';
import {PostComponent} from './post/post.component';
import {PostsComponent} from './posts/posts.component';
import {WriteoreditpostComponent} from './writeoreditpost/writeoreditpost.component';

const routes: Routes = [
  {
    path: 'post/:id', component: PostComponent
  },
  {
    path: 'posts', component: PostsComponent
  },
  {
    path:'writeoreditpost',component:WriteoreditpostComponent
  }
];

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule
  ],
  declarations: []
})
export class PostRoutingModule {
}
